home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM Gold
/
Light ROM Gold.iso
/
arexx
/
modeler
/
point2sp.lwm
< prev
next >
Wrap
Text File
|
1995-03-23
|
2KB
|
77 lines
/* Points to Spheres - for use in Lightwave Modeler
* Convert selected points to spheres. (Cuts initial object)
* By Monte Ohrtá⌐ 1994 The Rendering Plant Inc.
* e-mail mohrt@cse.unl.edu if you have comments etc. */
Version = 1.0
call addlib "LWModelerARexx.port", 0
sysnam = 'Points To Spheres'
signal on error
signal on syntax
call sel_mode(USER)
csurf=CurSurface()
call req_begin sysnam
id_txt = req_addcontrol("Convert Points",'T',"to Spheres")
id_typ = req_addcontrol("Sphere Type", 'CH',"Globe Tesselated")
id_srf = req_addcontrol("Surfaces",'R')
id_tes = req_addcontrol("Tesselation Level", 'n')
id_rad = req_addcontrol("Radius",'v',1)
id_sid = req_addcontrol("Globe Sides",'n')
id_seg = req_addcontrol("Globe Segments",'n')
call req_setval id_typ, 1
call req_setval id_tes, 2
call req_setval id_rad, .5
call req_setval id_sid, 16
call req_setval id_seg, 8
if (~req_post()) then do
call req_end
exit
end
type = req_getval(id_typ)
tess = req_getval(id_tes)
surf = req_getval(id_srf)
rad = req_getval(id_rad)
side = req_getval(id_sid)
segs = req_getval(id_seg)
call req_end()
say surf Csurf
if surf~=CSurf then call surface(surf)
n = xfrm_begin()
say n
do i = 1 to n
Point.i= xfrm_getpos(i)
say Point.i
end
call xfrm_end()
call CUT()
call meter_begin n+1, 'Creating Spheres'
do i=1 to n
if (type=1) then do
call MAKEBALL(rad,side,segs,point.i)
call meter_step
end
else do
call MAKETESBALL(rad,tess,point.i)
call meter_step
end
end
call remlib "LWModelerARexx.port"
exit
syntax:
error:
call end_all
t=Notify(1,'!Rexx Script Error','@'ErrorText(rc),'Line 'SIGL)
exit
PointCount: PROCEDURE
n=XFRM_BEGIN()
call END_ALL()
return n